<!DOCTYPE html>
<html>
<head>
   <link href="build/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet" />
   <script type="text/javascript" src="build/ext-all.js"></script>
   <script type="text/javascript">

       Ext.onReady(function () {
          var btn=Ext.create({xtype:'button',html:'add'});
          Ext.create({title:'panel'
            ,xtype:'panel'
            ,renderTo:Ext.getBody()
            ,width:200
            ,height:200
            ,items:[
              {xtype:'button',html:'click'
              ,listeners:{
                click:function(){
                  alert("hello");
                }
              }}
            ,btn
            ]})
          btn.on("click",function(){
            alert("hello123");
          })
      });
   </script>
</head>
<body>
   
</body>
</html>